from bank import Bank


def start_interface():
    print(
        '''
        ********************
        *    中国工商银行    *
        *    账户管理系统    *
        *       V 1.0      *
        ********************
        *  1. 开户          *
        *  2. 存钱          *
        *  3. 取钱          *
        *  4. 转账          *
        *  5. 查询          *
        *  6. 结束          *
        ********************
        '''
    )
    return int(input('请选择操作编号：'))


bank = Bank('工商银行')
while True:
    # 开始界面绘制
    opt = start_interface()
    if opt == 1:
        bank.add_account()
    elif opt == 2:
        username = int(input('请输入账户'))
        bank.save_money(username)
    elif opt == 3:
        username = int(input('请输入账户'))
        bank.withdrawal(username)
    elif opt == 4:
        username = int(input('请输入账户'))
        bank.transfer(username)
    elif opt == 5:
        username = int(input('请输入账户'))
        bank.get_account(username)
    elif opt == 6:
        break
    else:
        print('输入非法，请重新输入')
